﻿using System;
using Newtonsoft.Json.Linq;
using JsonCSharpClassGenerator;

namespace MyVideoTek
{

    internal class RatingStats
    {

        private JObject __jobject;
        public RatingStats(JObject obj)
        {
            this.__jobject = obj;
        }

        [System.Diagnostics.DebuggerBrowsable(System.Diagnostics.DebuggerBrowsableState.Never)]
        private Rating[] _rating;
        public Rating[] Rating
        {
            get
            {
                if(_rating == null)
                    _rating = (Rating[])JsonClassHelper.ReadArray<Rating>(JsonClassHelper.GetJToken<JArray>(__jobject, "rating"), JsonClassHelper.ReadStronglyTypedObject<Rating>, typeof(Rating[]));
                return _rating;
            }
        }

    }
}
